<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title></title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/xadmin.css">
		<script src="js/axios.min.js"></script>
		<script src="js/vue.min.js"></script>
        <script src="./lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="./js/xadmin.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
				
				
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">欢迎管理员：
                                <span class="x-red">admin</span>！当前时间: <span id="sj"></span>
                            </blockquote>
                        </div>
                    </div>
                </div>
				
				
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">数据统计</div>
                        <div class="layui-card-body ">
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>今日订单数</h3>
                                        <p>
                                            <cite id="0"></cite></p>
                                    </a>
                                </li>
								
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>今日完成单数</h3>
                                        <p>
                                            <cite id="1"></cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>今日指派单数</h3>
                                        <p>
                                            <cite id="2"></cite></p>
                                    </a>
                                </li>
								<li class="layui-col-md2 layui-col-xs6 ">
								    <a href="javascript:;" class="x-admin-backlog-body">
								        <h3>本月订单数</h3>
								        <p>
								            <cite id="3"></cite></p>
								    </a>
								</li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>总完成单数</h3>
                                        <p>
                                            <cite id="4"></cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>总订单数</h3>
                                        <p>
                                            <cite id="5"></cite></p>
                                    </a>
                                </li>
                                
                            </ul>
                        </div>
                    </div>
                </div>
				
				<div class="layui-fluid">
				    <div class="layui-row layui-col-space15">
				        <div class="layui-col-md12">
				            <div class="layui-card">
				                <div class="layui-card-body ">
				                    <blockquote class="layui-elem-quote">
				                    </blockquote>
				                    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
				                    <div id="main" style="width: 100%;height:400px;"></div>
				                    <blockquote class="layui-elem-quote">
				                    </blockquote>
				                </div>
				            </div>
				        </div>
				    </div>
				</div>
				
				
            </div>
        </div>
		
		<script src="https://cdn.bootcss.com/echarts/4.2.1-rc1/echarts.min.js"></script>
		    <script type="text/javascript">
		    // 基于准备好的dom，初始化echarts实例
		    var myChart = echarts.init(document.getElementById('main'));
		
		    // 指定图表的配置项和数据
		    var option = {
		        title: {
		            text: '本周盘点'
		        },
		        tooltip: {
		            trigger: 'axis'
		        },
		        legend: {
		            data:['本周群抢单','本周指派单','本周已完成订单','本周未完成订单','本周所有订单']
		        },
		        grid: {
		            left: '3%',
		            right: '4%',
		            bottom: '3%',
		            containLabel: true
		        },
		        toolbox: {
		            feature: {
		                saveAsImage: {}
		            }
		        },
		        xAxis: {
		            type: 'category',
		            boundaryGap: false,
		            data: ['周一','周二','周三','周四','周五','周六','周日']
		        },
		        yAxis: {
		            type: 'value'
		        },
		        series: [
		            {
		                name:'本周群抢单',
		                type:'line',
		                stack: '总量',
		                data:[120, 132, 101, 134, 90, 230, 210]
		            },
		            {
		                name:'本周指派单',
		                type:'line',
		                stack: '总量',
		                data:[20, 50, 30, 70, 100, 90, 110]
		            },
		            {
		                name:'本周已完成订单',
		                type:'line',
		                stack: '总量',
		                data:[150, 232, 201, 154, 190, 330, 410]
		            },
		            {
		                name:'本周未完成订单',
		                type:'line',
		                stack: '总量',
		                data:[20, 50, 90, 30, 40, 20, 10]
		            },
		            {
		                name:'本周总订单量',
		                type:'line',
		                stack: '总量',
		                data:[820, 932, 901, 934, 1290, 1330, 1320]
		            }
		        ]
		    };
		
		
		    // 使用刚指定的配置项和数据显示图表。
		    myChart.setOption(option);
		</script>
		<script>
		    var _hmt = _hmt || [];
		    (function() {
		      var hm = document.createElement("script");
		      hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
		      var s = document.getElementsByTagName("script")[0]; 
		      s.parentNode.insertBefore(hm, s);
		    })();
		    </script>
		
		<script type="application/javascript">
		
               var myDate = new Date();       	
			   document.getElementById("sj").innerHTML +=  myDate.toLocaleString();
			
			   /* 进入首页事件 */
			  window.onload=function(){
			  	 getshopnum();
			  }
			 
			    function getshopnum(){    
			   	
			   	var url = "http://129.204.188.236:8080/qiangdan/getshopnum";
			   	
			   	 axios
			   	.post(url)
			   	.then(function(response) {
			   		console.log(response.data);
					
			   	    document.getElementById("0").innerHTML += response.data.numtdstr;
			   	    document.getElementById("1").innerHTML += response.data.finumtdstr;
			   		document.getElementById("2").innerHTML += response.data.zpnumtdstr;
					document.getElementById("3").innerHTML += response.data.nummonthstr;
					document.getElementById("4").innerHTML += response.data.finumallstr;
					document.getElementById("5").innerHTML += response.data.numallstr;
			   				
			   		//window.open("member-edit.html","_blank");
			   		
			   	})
			   	.catch(function(error){
			   		console.log(error);
			   	});
			   }
			
		</script>

    </body>
</html>